<form action="<?=$this->url()?>" method="post">
    <label for="id_granja">Seleccione una granja para iniciar sesion </label>
    <select id="id_granja" name="id_granja" onchange="submit()">
        <option value="" selected="selected" disabled="disabled">ninguno</option>
        <?foreach ($this->granjas as $granja): ?>
        <option value="<?=$granja->getGranjaId()?>"><?=$granja->getAddedColumn('granja')?></option>
        <? endforeach;?>
    </select>
</form>